
var UIManager = {

    // 初始化
    init : function () {
        this.changeSceneWelcome();
        //this.changeSceneMain();
    },
    
    // 切换场景
    // 欢迎界面
    changeSceneWelcome : function () {
        this._changeScene(cc.BuilderReader.loadAsScene("UIWelcome"));
    },

    changeSceneMain : function () {
        this._changeScene(cc.BuilderReader.loadAsScene("UIMain"));
    },
    
    _changeScene : function (scene) {
        var director = cc.Director.getInstance();
        var runningScene = director.getRunningScene();
        if (runningScene === null) director.runWithScene(scene);
        else director.replaceScene(scene);
    },

    
};

